package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SeckillInfoMapper;
import com.ruoyi.system.domain.SeckillInfo;
import com.ruoyi.system.service.ISeckillInfoService;

/**
 * 秒杀信息Service业务层处理
 * 
 * @author kinglu
 * @date 2021-11-30
 */
@Service
public class SeckillInfoServiceImpl implements ISeckillInfoService 
{
    @Autowired
    private SeckillInfoMapper seckillInfoMapper;

    /**
     * 查询秒杀信息
     * 
     * @param seckillId 秒杀信息主键
     * @return 秒杀信息
     */
    @Override
    public SeckillInfo selectSeckillInfoBySeckillId(Long seckillId)
    {
        return seckillInfoMapper.selectSeckillInfoBySeckillId(seckillId);
    }

    /**
     * 查询秒杀信息列表
     * 
     * @param seckillInfo 秒杀信息
     * @return 秒杀信息
     */
    @Override
    public List<SeckillInfo> selectSeckillInfoList(SeckillInfo seckillInfo)
    {
        return seckillInfoMapper.selectSeckillInfoList(seckillInfo);
    }

    /**
     * 新增秒杀信息
     * 
     * @param seckillInfo 秒杀信息
     * @return 结果
     */
    @Override
    public int insertSeckillInfo(SeckillInfo seckillInfo)
    {
        return seckillInfoMapper.insertSeckillInfo(seckillInfo);
    }

    /**
     * 修改秒杀信息
     * 
     * @param seckillInfo 秒杀信息
     * @return 结果
     */
    @Override
    public int updateSeckillInfo(SeckillInfo seckillInfo)
    {
        return seckillInfoMapper.updateSeckillInfo(seckillInfo);
    }

    /**
     * 批量删除秒杀信息
     * 
     * @param seckillIds 需要删除的秒杀信息主键
     * @return 结果
     */
    @Override
    public int deleteSeckillInfoBySeckillIds(Long[] seckillIds)
    {
        return seckillInfoMapper.deleteSeckillInfoBySeckillIds(seckillIds);
    }

    /**
     * 删除秒杀信息信息
     * 
     * @param seckillId 秒杀信息主键
     * @return 结果
     */
    @Override
    public int deleteSeckillInfoBySeckillId(Long seckillId)
    {
        return seckillInfoMapper.deleteSeckillInfoBySeckillId(seckillId);
    }
}
